package com.pwt.repository;

import com.pwt.repository.base.BaseRepository;
import com.pwt.entity.RoleMenu;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

/**
 * RoleMenu Repository层
 *
 * @author auto generated
 * @date 2021-08-31 10:19:49
 */
public interface RoleMenuRepository extends BaseRepository<RoleMenu, String> {

    @Query(nativeQuery = true,value = "delete from role_menu where role_id=?1")
    @Modifying
    void deleteByRoleId(String roleId);

    @Query(nativeQuery = true,value = "delete from role_menu where menu_id=?1")
    @Modifying
    void deleteByMenuId(String menuId);
}
